package com.reagent.system.controller;


import com.reagent.system.service.TypeService;
import io.swagger.annotations.*;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RestController;

@Api(tags = "类别接口")
@ApiResponses({
        @ApiResponse(code = 200, message = "成功"),
        @ApiResponse(code = 201, message = "成功创建资源"),
        @ApiResponse(code = 400, message = "失败"),
        @ApiResponse(code = 401, message = "服务器认证失败"),
        @ApiResponse(code = 403, message = "资源不存在"),
        @ApiResponse(code = 404, message = "页面不存在"),
        @ApiResponse(code = 500, message = "服务器异常")
})
@RestController
@Slf4j
public class TypeController {

    @Autowired
    private TypeService typeService;

    @ApiOperation(value = "获取所有类别", notes = "获取所有类别信息")
    @GetMapping("/getTypeAll")
    public Object getTypeAll() {
        return typeService.getTypeAll();
    }

}

